package com.springboot.kafka;

import org.springframework.stereotype.Component;

import lombok.extern.log4j.Log4j2;

/**
 * 用户kafka消息消费
 *
 * @author supu
 * @create 2019-01-29 10:10
 **/
@Log4j2
@Component
public class UserkafkaConsumer {

    /*@KafkaListener(topics = {"${kafka.topic.user}"})
    public void processMessage(String message) {
        log.info("用户kafka消费消息：{}", message);

        KafkaMessage<UserKafka> kafkaMessage = JSONObject.parseObject(message,
                new TypeReference<KafkaMessage<UserKafka>>() {
        });

        log.info("转换消息后用户对象：{}", kafkaMessage.getBody());
    }*/
}
